﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using ElectronicCommerce.Framework.Web.ResourceManagement;
using ElectronicCommerce.Framework.Web.StateManagement;

namespace ElectronicCommerce.Framework.Web.UI
{
    public class ServerControlBase : Control
    {
        protected PageBase ContentPage
        {
            get { return Page as PageBase; }
        }

        protected PageHead PageHead
        {
            get { return ContentPage.PageHead; }
        }

        protected PageFoot PageFoot
        {
            get { return ContentPage.PageFoot; }
        }

        public ResourceBuilder Resource
        {
            get { return ContentPage.Resource; }
        }

        public UrlBuilder Url
        {
            get { return ContentPage.Url; }
        }

        public IStateProvider State
        {
            get { return ContentPage.State; }
        }
    }
}
